﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Lab2
{
    public class Support
    {
        public long GiaiThua(int n)
        {
            if (n <= 1)
                return 1;
            long gt = 1;
            for (int i = 1; i <= n; i++)
            {
                gt *= i;
            }
            return gt;
        }
        public bool NT(int x)
        {
            int temp = (int)Math.Sqrt(x);
            for (int i = 2; i <=temp ; i++)
            {
                if (x % i == 0)
                    return false;
            }
            return true;
        }
        public List<int> CreateNT(int n)
        {
            List<int> ds = new List<int>();
            int count = 0;
            int i = 1;
            while (count < n)
            {
                if (NT(i))
                {
                    ds.Add(i);
                    count++;
                }
                i++;
            }
            return ds;
        }

    }
}